/**
 * 
 */
package chess;

/**
 * 
 * <pre>
 * Max Joyce
 * -Created initial Class 01/21/10)
 * Samual Martelli
 * -Added the comments section to QueenPiece(1/22/10)
 * Andrew Jeffery 
 * -Added diagonal  Movement Behaviour of a Queen(01/22/10)(removed and refactored to LineMover)
 * </pre>
 *
 */
public class QueenPiece extends LineMover {
	public static final String QUEEN = "Queen";
	
	/**
	 * @param p The player that this piece belongs to
	 * @param t The location that the piece should be in
	 */
	public QueenPiece(Player p, Tile t) {
		super(p, t);
		this.moveStyle.add(LineMover.NORTHEAST);
		this.moveStyle.add(LineMover.NORTH);
		this.moveStyle.add(LineMover.NORTHWEST);
		this.moveStyle.add(LineMover.WEST);
		this.moveStyle.add(LineMover.SOUTHWEST);
		this.moveStyle.add(LineMover.SOUTH);
		this.moveStyle.add(LineMover.SOUTHEAST);
		this.moveStyle.add(LineMover.EAST);
	}
	

	/**
	 * @return Returns a string representation of the piece
	 */
	public String toString() {
		if (player.getColour()=="Black"){
			return "Q";
		}
		else if (player.getColour()=="White"){
			return "q";
		}
		return ".";
	}

	public String getName(){
		return QUEEN;
	}
}
